查询 Batch Refund 对象列表

你可以使用调用该接口来查询对应的 batch refund 对象列表信息。

请求参数描述
page optional int页码,取值范围:1~1000000000;默认值为"1"。
per_page optional int每页数量,取值范围:1~100;默认值为"10"。
created[gt] optional int创建时间大于该值。
created[gte] optional int创建时间大于或等于该值。
created[lt] optional int创建时间小于该值。
created[lte] optional int创建时间小于或等于该值。
app optional string批量退款对应的 app 对象 ID,查看如何获取App ID

返回

返回一个 batch refund 对象列表或者一个错误,详见 错误

定义

GET https://api.pingxx.com/v1/batch_refunds?app={app_id}
$batch_re_all = \Pingpp\BatchRefund::all($search_params);
待补充。
待补充。
待补充。
待补充。
batchRefundList, err := batchRefund.List(params);
待补充。

请求示例

curl https://api.pingxx.com/v1/batch_refunds?app={app_id} \
-H "Content-Type: application/json; charset=utf-8" \
-H "Pingplusplus-Signature: SIGNATURE" \
-H "Pingplusplus-Request-Timestamp: 1476067085" \
-u sk_test_ibbTe5jLGCi5rzfH4OqPW9KC:
$search_params = [              //搜索条件,此数组可以为空
    'page'      => 1,           //页码,取值范围:1~1000000000;默认值为"1"
    'per_page'  => 2            //每页数量,取值范围:1~100;默认值为"10"
];
try {
    $batch_re_all = \Pingpp\BatchRefund::all($search_params);
    echo $batch_re_all;                                                     // 输出 Ping++ 返回的 batch refund 对象列表
} catch (\Pingpp\Error\Base $e) {
    if ($e->getHttpStatus() != null) {
        header('Status: ' . $e->getHttpStatus());
        echo $e->getHttpBody();
    } else {
        echo $e->getMessage();
    }
}
待补充。
待补充。
待补充。
待补充。
func Example_list() {
  params := &pingpp.PagingParams{}
  params.Filters.AddFilter("page", "", "1")
  params.Filters.AddFilter("per_page", "", "2")
  params.Filters.AddFilter("app", "", "app_1Gqj58ynP0mHeX1q")
  batchRefundList, err := batchRefund.List(params)
  if err != nil {
    log.Fatal(err)
    return
  }
  fmt.Printf("%#v", batchRefundList)
}
待补充。

返回示例

{
  "object": "list",
  "url": "/v1/batch_refunds",
  "has_more": true,
  "data": [
    {
      "id": "1501612191333090605",
      "app": "app_LibTW1n1SOq9Pin1",
      "object": "batch_refund",
      "batch_no": "Br20161219133308975749",
      "created": 1482125589,
      "description": "for batch refund",
      "charges": [
        {
          "charge": "ch_5eLqPSWHefbLPOirrLrfXzT8",
          "refund": re_nL0nD0iDPmfy1u944HyvnrT1",
          "status": "succeeded",
          "failure_msg": null,
          "amount": 1,
          "description": "Description of batch refund for ch_5eLqPSWHefbLPOirrLrfXzT8 channel is alipay_pc_direct"
        }
      ],
      "refunds": {
        "object": "list",
        "url": null,
        "has_more": false,
        "data": [
          {
            "id": "re_9mDWDOi9CeXT5Wf1ePybH8SO",
            "object": "refund",
            "order_no": "9mDWDOi9CeXT5Wf1ePybH8SO",
            "amount": 1,
            "created": 1482125589,
            "succeed": true,
            "status": "succeeded",
            "time_succeed": 1482125591,
            "description": "Description of batch refund for ch_5eLqPSWHefbLPOirrLrfXzT8 channel is alipay_pc_direct",
            "failure_code": null,
            "failure_msg": null,
            "metadata": {},
            "charge": "ch_5eLqPSWHefbLPOirrLrfXzT8",
            "charge_order_no": "sKXY8NMQiPElBPCtKwl",
            "transaction_no": "2016121232962609"
          }
        ]
      },
      "refund_url": null,
      "status": "succeeded",
      "time_succeeded": 1482125591,
      "livemode": false,
      "metadata": {
        "userStr": "KTs/YDg3ZFUFONZUC10SuA=="
      }
    },
    {
      "id": "1501612121108270241",
      "app": "app_LibTW1n1SOq9Pin1",
      "object": "batch_refund",
      "batch_no": "Br20161212110832753837",
      "created": 1481512107,
      "description": "for batch refund",
      "charges": [
        {
          "charge": "ch_zHGezDPeTm5054azPS4K4e94",
          "refund": re_nL0nD0iDPmfy1u944HyvnrT1",
          "status": "succeeded",
          "failure_msg": null,
          "amount": 1,
          "description": "Description of batch refund for ch_zHGezDPeTm5054azPS4K4e94"
        },
        {
          "charge": "ch_HmXj9KmTaP0S0yjLi1HCKCGS",
          "refund": re_nL0nD0iDPmfy1u944HyvnrT1",
          "status": "succeeded",
          "failure_msg": null,
          "amount": 1,
          "description": "Description of batch refund for ch_HmXj9KmTaP0S0yjLi1HCKCGS"
        },
        {
          "charge": "ch_LOmfTSSWjLSSHyjn58Wjn5CK",
          "refund": re_nL0nD0iDPmfy1u944HyvnrT1",
          "status": "succeeded",
          "failure_msg": null,
          "amount": 1,
          "description": "Description of batch refund for ch_LOmfTSSWjLSSHyjn58Wjn5CK"
        },
        {
          "charge": "ch_m90CKGuf54KGiXrzvP94eTqT",
          "refund": re_nL0nD0iDPmfy1u944HyvnrT1",
          "status": "succeeded",
          "failure_msg": null,
          "amount": 1,
          "description": "Description of batch refund for ch_m90CKGuf54KGiXrzvP94eTqT"
        }
      ],
      "refunds": {
        "object": "list",
        "url": null,
        "has_more": false,
        "data": [
          {
            "id": "re_n9qLaLibLaXDrHWPS8u1efv9",
            "object": "refund",
            "order_no": "n9qLaLibLaXDrHWPS8u1efv9",
            "amount": 1,
            "created": 1481512107,
            "succeed": true,
            "status": "succeeded",
            "time_succeed": 1481512110,
            "description": "Description of batch refund for ch_HmXj9KmTaP0S0yjLi1HCKCGS",
            "failure_code": null,
            "failure_msg": null,
            "metadata": {},
            "charge": "ch_HmXj9KmTaP0S0yjLi1HCKCGS",
            "charge_order_no": "p4D9bD2fWloQAJF0xeW",
            "transaction_no": "2016121266712557"
          },
          {
            "id": "re_zrrf10m5OeP8WnDazDWjr9u1",
            "object": "refund",
            "order_no": "zrrf10m5OeP8WnDazDWjr9u1",
            "amount": 1,
            "created": 1481512384,
            "succeed": true,
            "status": "succeeded",
            "time_succeed": 1481512384,
            "description": "Description of batch refund for ch_zHGezDPeTm5054azPS4K4e94",
            "failure_code": null,
            "failure_msg": null,
            "metadata": {},
            "charge": "ch_zHGezDPeTm5054azPS4K4e94",
            "charge_order_no": "nr3nzd0LKUZPGffdnWk",
            "transaction_no": "20161212762249932756398526"
          },
          {
            "id": "re_8ibfP4iHqvX1vPm5yL1unj10",
            "object": "refund",
            "order_no": "8ibfP4iHqvX1vPm5yL1unj10",
            "amount": 1,
            "created": 1481512395,
            "succeed": true,
            "status": "succeeded",
            "time_succeed": 1481512395,
            "description": "Description of batch refund for ch_m90CKGuf54KGiXrzvP94eTqT",
            "failure_code": null,
            "failure_msg": null,
            "metadata": {},
            "charge": "ch_m90CKGuf54KGiXrzvP94eTqT",
            "charge_order_no": "74WcRECvtRK3358OxSE",
            "transaction_no": "201612121113158363064"
          },
          {
            "id": "re_fPO48GH8ynfD1WrrTCrTiXHG",
            "object": "refund",
            "order_no": "fPO48GH8ynfD1WrrTCrTiXHG",
            "amount": 1,
            "created": 1481512414,
            "succeed": true,
            "status": "succeeded",
            "time_succeed": 1481512414,
            "description": "Description of batch refund for ch_LOmfTSSWjLSSHyjn58Wjn5CK",
            "failure_code": null,
            "failure_msg": null,
            "metadata": {},
            "charge": "ch_LOmfTSSWjLSSHyjn58Wjn5CK",
            "charge_order_no": "W3ryYhJ759OiqoIqrWL",
            "transaction_no": "201612121113343118084"
          }
        ]
      },
      "refund_url": null,
      "status": "succeeded",
      "time_succeeded": 1481514395,
      "livemode": false,
      "metadata": {
        "userStr": "KTs/YDg3ZFUFONZUC10SuA=="
      }
    },
    {
      "id": "1501612121057324115",
      "app": "app_LibTW1n1SOq9Pin1",
      "object": "batch_refund",
      "batch_no": "Br20161212105736913001",
      "created": 1481511452,
      "description": "for batch refund",
      "charges": [
        {
          "charge": "ch_DmrrLS4mXLW5rTmv98eTO8CC",
          "amount": 1,
          "description": "Description of batch refund for ch_DmrrLS4mXLW5rTmv98eTO8CC",
          "status": "pending"
        }
      ],
      "refunds": {
        "object": "list",
        "url": null,
        "has_more": false,
        "data": [
          {
            "id": "re_SSyHyTLmDif5rL08eL9S0KaL",
            "object": "refund",
            "order_no": "SSyHyTLmDif5rL08eL9S0KaL",
            "amount": 1,
            "created": 1481511452,
            "succeed": false,
            "status": "pending",
            "time_succeed": null,
            "description": "Description of batch refund for ch_DmrrLS4mXLW5rTmv98eTO8CC",
            "failure_code": null,
            "failure_msg": null,
            "metadata": {},
            "charge": "ch_DmrrLS4mXLW5rTmv98eTO8CC",
            "charge_order_no": "WTcuLygwsBoXzyxbTzo",
            "transaction_no": "2016121292506338"
          }
        ]
      },
      "refund_url": "https://mapi.alipay.com/gateway.do?_input_charset=utf-8&batch_no=2016121233903404362155702070&batch_num=1&detail_data=2016121296863396%5E1%5Edesc&notify_url=https%3A%2F%2Fapi.pingpluspl.us%2Fnotify%2Fcharges%2F561787072392318340672504%2Frefunds%2F495666061961734591287292&partner=2008435904851794&refund_date=2016-12-12%2010%3A57%3A32&seller_user_id=2008435904851794&service=refund_fastpay_by_platform_pwd&sign=YnpEcTUwR3VIQ3FQQzBXMVNDSEt1YlhQ&sign_type=RSA",
      "status": "pending",
      "time_succeeded": null,
      "livemode": false,
      "metadata": {
        "userStr": "KTs/YDg3ZFUFONZUC10SuA=="
      }
    }
  ]
}